<div class="menu_first">
<?php
	if( $_SESSION['logged']){
		$admin_btns[] = array("label"=>"Banners Home", "href"=>"index.php");
		$admin_btns[] = array("label"=>"Productos", "href"=>"product_list.php");
		$admin_btns[] = array("label"=>"Subcategorias", "href"=>"subcategory_list.php");
		$admin_btns[] = array("label"=>"Salir", "href"=>"logout.php");
			     
		foreach (array_reverse($admin_btns) as $btn ){
			
			$filePath = explode("/", $_SERVER[ 'PHP_SELF'] );
			$thisFile = $filePath[ count($filePath) - 1 ];
			
			$class = "menu_first_item";
			if( $btn[href] == $thisFile ) $class .= "_active";
					
			$btn[label] = strtoupper($btn[label]);
			echo "\t<div class=\"$class\"><a href=\"$btn[href]\">$btn[label]</a></div>\r\n";
		}
	}
?>
</div>
